3.1.47 \(\int \frac {1}{a+a \sec (c+d x)} \, dx\) [47]

Optimal. Leaf size=29 \[ \frac {x}{a}-\frac {\tan (c+d x)}{d (a+a \sec (c+d x))} \]

[Out]

x/a-tan(d*x+c)/d/(a+a*sec(d*x+c))

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 29, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3862, 8} \begin {gather*} \frac {x}{a}-\frac {\tan (c+d x)}{d (a \sec (c+d x)+a)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + a*Sec[c + d*x])^(-1),x]

[Out]

x/a - Tan[c + d*x]/(d*(a + a*Sec[c + d*x]))

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 3862

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n_), x_Symbol] :> Simp[(-Cot[c + d*x])*((a + b*Csc[c + d*x])^n/(d*
(2*n + 1))), x] + Dist[1/(a^2*(2*n + 1)), Int[(a + b*Csc[c + d*x])^(n + 1)*(a*(2*n + 1) - b*(n + 1)*Csc[c + d*
x]), x], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0] && LeQ[n, -1] && IntegerQ[2*n]

Rubi steps

\begin {align*} \int \frac {1}{a+a \sec (c+d x)} \, dx &=-\frac {\tan (c+d x)}{d (a+a \sec (c+d x))}+\frac {\int a \, dx}{a^2}\\ &=\frac {x}{a}-\frac {\tan (c+d x)}{d (a+a \sec (c+d x))}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.14, size = 58, normalized size = 2.00 \begin {gather*} \frac {\sec \left (\frac {c}{2}\right ) \sec \left (\frac {1}{2} (c+d x)\right ) \left (d x \cos \left (\frac {d x}{2}\right )+d x \cos \left (c+\frac {d x}{2}\right )-2 \sin \left (\frac {d x}{2}\right )\right )}{2 a d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + a*Sec[c + d*x])^(-1),x]

[Out]

(Sec[c/2]*Sec[(c + d*x)/2]*(d*x*Cos[(d*x)/2] + d*x*Cos[c + (d*x)/2] - 2*Sin[(d*x)/2]))/(2*a*d)

________________________________________________________________________________________

Maple [A]
time = 0.04, size = 32, normalized size = 1.10

method result size
norman \(\frac {x}{a}-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{a d}\) \(24\)
risch \(\frac {x}{a}-\frac {2 i}{d a \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}\) \(29\)
derivativedivides \(\frac {-\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+2 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}\) \(32\)
default \(\frac {-\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+2 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}\) \(32\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(a+a*sec(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

1/d/a*(-tan(1/2*d*x+1/2*c)+2*arctan(tan(1/2*d*x+1/2*c)))

________________________________________________________________________________________

Maxima [A]
time = 0.49, size = 49, normalized size = 1.69 \begin {gather*} \frac {\frac {2 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a} - \frac {\sin \left (d x + c\right )}{a {\left (\cos \left (d x + c\right ) + 1\right )}}}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+a*sec(d*x+c)),x, algorithm="maxima")

[Out]

(2*arctan(sin(d*x + c)/(cos(d*x + c) + 1))/a - sin(d*x + c)/(a*(cos(d*x + c) + 1)))/d

________________________________________________________________________________________

Fricas [A]
time = 2.80, size = 37, normalized size = 1.28 \begin {gather*} \frac {d x \cos \left (d x + c\right ) + d x - \sin \left (d x + c\right )}{a d \cos \left (d x + c\right ) + a d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+a*sec(d*x+c)),x, algorithm="fricas")

[Out]

(d*x*cos(d*x + c) + d*x - sin(d*x + c))/(a*d*cos(d*x + c) + a*d)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {1}{\sec {\left (c + d x \right )} + 1}\, dx}{a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+a*sec(d*x+c)),x)

[Out]

Integral(1/(sec(c + d*x) + 1), x)/a

________________________________________________________________________________________

Giac [A]
time = 0.44, size = 28, normalized size = 0.97 \begin {gather*} \frac {\frac {d x + c}{a} - \frac {\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a}}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+a*sec(d*x+c)),x, algorithm="giac")

[Out]

((d*x + c)/a - tan(1/2*d*x + 1/2*c)/a)/d

________________________________________________________________________________________

Mupad [B]
time = 0.64, size = 23, normalized size = 0.79 \begin {gather*} \frac {x}{a}-\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{a\,d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(a + a/cos(c + d*x)),x)

[Out]

x/a - tan(c/2 + (d*x)/2)/(a*d)

________________________________________________________________________________________